package com.scnu.hachimi.element;

import com.scnu.hachimi.manager.ResourcesManager;

import java.awt.*;

public class Wall extends ElementObject{
    public int hp;
    public boolean canThrough;

    public Wall(String img, int x, int y, int hp, boolean canThrough) {
        super(img, x, y, 20, 20);
        this.hp = hp;
        this.canThrough = canThrough;
    }

    @Override
    public void paintSelf(Graphics g, ResourcesManager rm) {
        g.drawImage(rm.imageMap.get(img), x, y, w, h, null);
    }

    @Override
    public Rectangle getRect() {
        return new Rectangle(x, y, w, h);
    }
}
